<ion-view class="bg">
  <ion-header-bar class="bar bar-positive">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear" nav-direction="back" ui-sref="tab.workbench">返回</button>
    <h3 class="title">外发管理</h3>
    <button class="button button-icon icon ion-ios-search" ng-click="modal.show()"></button>
  </ion-header-bar>
  <div class="bar bar-subheader subheader btnDiv">
    <button class="button button-positive longButton" ui-sref="addGoods">添加货物</button>
  </div>
  <ion-content style="margin-top: 43px;">
    <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
    <div ng-if="showloading" class="ion-spinner">
      <ion-spinner icon="lines" class="spinner-calm"></ion-spinner>
    </div>
    <ion-list class="myList" ng-if="showloading == false">
      <h5 ng-if="transferData==''" class="notFound">未找到数据</h5>
      <li class="item li" ng-repeat="data in transferData" ng-click="goTransDetail(data.ID,data)">
        <div>
          <i>中转单号</i>
          <i class="value" style="color: #11c1f3">{{data.TRANSFER_NO}}</i>
        </div>
        <div>
          <i>中转公司</i>
          <i class="value">{{data.TRANSFER_COMPANY_NAME}}</i>
        </div>
        <img ng-if="data.TRANSFER_STATUS=='0'" src="img/transferState-0.png" class="stateImg">
        <img ng-if="data.TRANSFER_STATUS!='0'" src="img/orderState-{{data.TRANSFER_STATUS}}.png" class="stateImg">
        <div>
          <i>中转日期</i>
          <i class="value">{{data.TRANSFER_DATE | date : "yyyy年MM月dd日"}}</i>
        </div>
        <div>
          <i>代收款合计</i>
          <i class="value">{{data.AGENCY_FUND_TOTAL | number:2}}</i>
        </div>
        <div>
          <i>中转费合计</i>
          <i class="value">{{data.TRANSFER_CHARGE | number:2}}</i>
        </div>
        <div>
          <i>到付合计</i>
          <i class="value">{{data.TO_PAYMENT_TOTAL | number:2}}</i>
        </div>
      </li>
    </ion-list>
    <ion-infinite-scroll on-infinite="loadMore()" distance="1%" ng-if="hasNextPage()"></ion-infinite-scroll>
  </ion-content>
</ion-view>
